
public class Home {

	static String input_filename = "data.mps";
	static String output_filename = "out.txt";
	
	public static void main (String[] args){
		InputFile Input = new InputFile(input_filename);
		int nbline = Input.Get_NB_Line_File();
		PSInterpreter interpreter = new PSInterpreter();
		
		
		for (int i = 0; i < nbline; i++) {
			interpreter.EvalQueue(Input.Line_File_to_Queue(i));
		}
		
		OutputFile Output = new OutputFile(output_filename);
		try {
			Output.Stack_to_File(interpreter.getPrintedQueue()); //write final stack to file
		} catch (EmptyStackException e) {
			System.out.println("Stack empty when writing in file");
		}
		
		System.out.println(interpreter.getPrintedQueue().toString());
		
		Input.closeFile();
		Output.close_File();
	}
}